﻿#ifndef PST_POSTENUMTYPE_H
#define PST_POSTENUMTYPE_H

#include <qflags.h>

namespace pst
{
    enum class Cure2DType
    {
        None = 0,
        GainDirection,
        Gain,
        Effiective
    };

    enum class FileDataType
    {
        None = 0x00,
        File2DCurve = 0x01,
        FilePolar = 0x02,
        FileSurfaceElectricFieldGraph = 0x04,
        FileTwoDHeatMap = 0x08,
        FileThreeDCloudMap = 0x10,
        FileThreeDSurfacePlot = 0x20,
        FileTwoDPeakValleyGraph = 0x40,
        FileDataTable = 0x80
    };
    Q_DECLARE_FLAGS(FileDataTypes, FileDataType)
    Q_DECLARE_OPERATORS_FOR_FLAGS(FileDataTypes);

    // 也许可以和FileDataType合并，等待后续需求明确后再做调整
    enum class GraphType
    {
        None = 0,
        TwoDLineChart,
        PolarGraph,
        SurfaceElectricFieldMap,
        TwoDHeatMap,
        ThreeDCloudMap,
        ThreeDSurfacePlot,
        TwoDPeakValleyGraph,
        TableChart
    };

    // 测量类型
    enum class MeasureType
    {
        StandingWaveBandwidth,
        HalfPowerBeamWidth,
        MaxValue,
        MinValue,
        AverageValue
    };

    // 插值类型
    enum class InterpolationType
    {
        None = 0,
        linearInterpolation,//线性插值
        logarithmicInterpolationSingleAxisX,//单X轴对数插值
        logarithmicInterpolationSingleAxisY,//单Y轴对数插值
        logarithmicInterpolationDoubleAxis,//双对数轴对数插值
        splineInterpolation,//样条插值
        polynomialInterpolation,//多项式插值
    };

    enum class CurrentWindowType
    {
        None = 0,
        TwoDGraph,               // 二维折线图
        PolarGraph,              // 极坐标图
        TwoDHeatMap,             // 二维热力图
        ThreeDCloudMap,          // 三维云图
        ThreeDSurfacePlot,       // 三维曲面图
        SurfaceElectricFieldMap, // 表面电场图
        DataTable,               // 数据表格
    };

    static QString getMeasureTypeName(MeasureType type)
    {
        switch (type)
        {
        case MeasureType::StandingWaveBandwidth:
            return "驻波带宽";
        case MeasureType::HalfPowerBeamWidth:
            return "半功率波束带宽";
        case MeasureType::MaxValue:
            return "最大值";
        case MeasureType::MinValue:
            return "最小值";
        case MeasureType::AverageValue:
            return "平均值";
        default:
            break;
        }
        return QString();
    }
} // namespace pst
#endif
